package com.example.springbootdemo.bean;

import lombok.Data;

@Data
public class ResultData<T> {

    /**
     * 返回异常码
     */
    private Integer code = 200;

    /**
     * 数据
     */
    private T data;

    /**
     * 消息
     */
    private String message = "";

    private Boolean success = true;

    public ResultData(){}

    public ResultData(T data, boolean success){
        this.data = data;
        this.success = success;
    }

    public ResultData(T data, boolean success, String message){
        this.data = data;
        this.success = success;
        this.message = message;
    }
}